
package com.jf.cloud.common.product.vo;

import com.jf.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 套装VO
 *
 * @author zz
 * @date 2022-08-16 09:18:06
 */
public class ComboVO extends BaseVO{
    private static final long serialVersionUID = 1L;

    @Schema(description = "套餐id" )
    private Long comboId;

    @Schema(description = "套餐名称" )
    @NotBlank(message = "套餐名称不能为空")
    private String name;

    @Schema(description = "创建时间" )
    private Date createTime;

    @Schema(description = "更新时间" )
    private Date updateTime;

    @Schema(description = "活动开始时间" )
    @NotNull(message = "活动开始时间不能为空")
    private Date startTime;

    @Schema(description = "活动结束时间" )
    @NotNull(message = "活动结束时间不能为空")
    private Date endTime;

    @Schema(description = "状态， -1：已删除 0：已失效 1：开启" )
    private Integer status;

    @Schema(description = "销量" )
    private Integer soldNum;

    @Schema(description = "套餐价格" )
    private Long price;

    @Schema(description = "店铺id" )
    private Long shopId;

    @Schema(description = "主商品id" )
    private Long mainSpuId;

    @Schema(description = "主商品" )
    @Valid
    private ComboSpuVO mainSpu;

    @Schema(description = "搭配商品列表" )
    @Valid
    private List<ComboSpuVO> matchingSpus;

    @Schema(description = "商品数量" )
    private Integer spuCount;

    @Schema(description = "套餐价" )
    private Long matchingPrice;

    @Schema(description = "主商品图片" )
    private String mainSpuName;

    @Schema(description = "主商品名称" )
    private String mainSpuImgUrl;

    @Schema(description = "搭配商品名称" )
    private String matchSpuName;

    @Schema(description = "语言" )
    private Integer lang;

    @Schema(description = "节省钱" )
    private Long savePrice;

    public Long getSavePrice() {
        return savePrice;
    }

    public void setSavePrice(Long savePrice) {
        this.savePrice = savePrice;
    }

    @Override
    public Date getUpdateTime() {
        return updateTime;
    }

    @Override
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public ComboSpuVO getMainSpu() {
        return mainSpu;
    }

    public void setMainSpu(ComboSpuVO mainSpu) {
        this.mainSpu = mainSpu;
    }

    public List<ComboSpuVO> getMatchingSpus() {
        return matchingSpus;
    }

    public void setMatchingSpus(List<ComboSpuVO> matchingSpus) {
        this.matchingSpus = matchingSpus;
    }

    public Integer getSpuCount() {
        return spuCount;
    }

    public void setSpuCount(Integer spuCount) {
        this.spuCount = spuCount;
    }

    public Long getMatchingPrice() {
        return matchingPrice;
    }

    public void setMatchingPrice(Long matchingPrice) {
        this.matchingPrice = matchingPrice;
    }

    public String getMainSpuName() {
        return mainSpuName;
    }

    public void setMainSpuName(String mainSpuName) {
        this.mainSpuName = mainSpuName;
    }

    public String getMatchSpuName() {
        return matchSpuName;
    }

    public void setMatchSpuName(String matchSpuName) {
        this.matchSpuName = matchSpuName;
    }

    public Integer getLang() {
        return lang;
    }

    public void setLang(Integer lang) {
        this.lang = lang;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getComboId() {
        return comboId;
    }

    public void setComboId(Long comboId) {
        this.comboId = comboId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Long getMainSpuId() {
        return mainSpuId;
    }

    public void setMainSpuId(Long mainSpuId) {
        this.mainSpuId = mainSpuId;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public Integer getSoldNum() {
        return soldNum;
    }

    public void setSoldNum(Integer soldNum) {
        this.soldNum = soldNum;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMainSpuImgUrl() {
        return mainSpuImgUrl;
    }

    public void setMainSpuImgUrl(String mainSpuImgUrl) {
        this.mainSpuImgUrl = mainSpuImgUrl;
    }

    @Override
    public String toString() {
        return "ComboVO{" +
                "comboId=" + comboId +
                ",name=" + name +
                ",createTime=" + createTime +
                ",updateTime=" + updateTime +
                ",startTime=" + startTime +
                ",endTime=" + endTime +
                ",mainSpuId=" + mainSpuId +
                ",price=" + price +
                ",soldNum=" + soldNum +
                ",shopId=" + shopId +
                ",status=" + status +
                '}';
    }
}
